package src;

public class SearchlastString {
    public static void main(String[] args) {
        String strOrig = "Hello world ,Hello Runoob";
        int lastIndex = strOrig.lastIndexOf("Runoob");
        if(lastIndex == -1){
            System.out.println("字符串中不存在Runoob");
        }else{
            System.out.println("字符串中Runoob最后出现的位置是："+lastIndex);
        }
        }
    }

